The door whose own door_id is door’s current mode - one of DOOR_TWO_WAY, DOOR_ENTER_ONLY or DOOR_EXIT_ONLY. Compare it with ==, the same way tile_class is compared. door may be the door’s own name (given it in the Room Editor) - resolved to its door_id at compile time, for free - or a door_id int, literal or computed.
door_mode(door) -> int| Name | Type |
|---|---|
door | door |
int
The door whose own door_id is door's current mode - one of DOOR_TWO_WAY, DOOR_ENTER_ONLY or DOOR_EXIT_ONLY. Compare it with ==, the same way tile_class is compared. The getter twin of door_set_mode. door accepts a door's own NAME (resolved to its door_id at compile time) or a plain door_id int - see door_lock's own description for the full reasoning.
Reads back DOOR_TWO_WAY for a door_id naming no live instance right now (see the Limits section below) - the same "not found" default door_is_locked's own false is, never a distinct sentinel value.
if (door_mode(4) == DOOR_EXIT_ONLY) {
draw_text_anchored(ANCHOR_TOP_LEFT, 4, 4, "ONE WAY");
}Shows a small label whenever the door with door_id 4 is currently Exit-only - a common hint that a passage cannot be walked back through the way it was entered.
Same current-room-only limit as door_lock: a door instance is never persistent, so a door_id belonging to a room that is not the one currently loaded is not a live instance of anything right now, and this reads back DOOR_TWO_WAY - the same value a real two-way door in the current room would report. It is not possible to tell "genuinely two-way" apart from "not currently loaded" from this function alone.
Reads back DOOR_TWO_WAY for a door_id naming no LIVE instance right now (this room’s own doors only - see this group’s own header) - the same "not found" default door_is_locked’s own false is, never a distinct sentinel. A door NAME that no longer exists is a compile error naming it, not a silent DOOR_TWO_WAY.